package com.kcht.sylyg08.dao.impl;

import com.kcht.adp.common.log.Logger;
import com.kcht.sylyg08.dao.DataSourceBaseDao;
import com.kcht.sylyg08.dao.IReaderDao;
import com.kcth.sylyg08.entity.Reader;

import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.inject.Inject;
import javax.persistence.Query;
import java.util.List;

/**
  *
  * @Package:        com.kcht.sylyg08.dao.impl
  * @Description:     java类作用描述
  * @Author:         lenovo
  * @CreateDate:     2019/5/15 10:12
 */
@Singleton
@Startup
public class ReaderDao extends DataSourceBaseDao<Reader, Long> implements IReaderDao {
    @Inject
    private Logger log;

    @Override
    public Reader getReaderByIP(String ip) {
        return selectOneByJPQL("select a from Reader a where a.ip = ?", ip);
    }
}
